package org.dromara.mall.domain.vo;

import org.dromara.common.translation.annotation.Translation;
import org.dromara.common.translation.constant.TransConstant;
import org.dromara.mall.domain.TerMallOrderitem;
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;



/**
 * 订单明细视图对象 ter_mall_orderitem
 *
 * @author xch
 * @date 2025-06-27
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = TerMallOrderitem.class)
public class TerMallOrderitemVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @ExcelProperty(value = "")
    private Long id;

    /**
     * 订单ID
     */
    @ExcelProperty(value = "订单ID")
    private String orderId;

    /**
     * 商品ID
     */
    @ExcelProperty(value = "商品ID")
    private Long productId;

    /**
     * 商品名称（快照）
     */
    @ExcelProperty(value = "商品名称", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "快=照")
    private String productName;

    /**
     * 单价（快照）
     */
    @ExcelProperty(value = "单价", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "快=照")
    private Integer price;

    /**
     * 数量
     */
    @ExcelProperty(value = "数量")
    private Long quantity;

    /**
     * 总价
     */
    @ExcelProperty(value = "总价")
    private Integer totalPrice;

    /**
     * 缩略图URL
     */
    @ExcelProperty(value = "缩略图URL")
    private String thumbnail;

    /**
     * 缩略图URLUrl
     */
    @Translation(type = TransConstant.OSS_ID_TO_URL, mapper = "thumbnail")
    private String thumbnailUrl;
}
